package com.hzqy.persistence.dao.epg;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.CmActivityVo;
import com.hzqy.web.vo.epg.AcDrawButtonVo;
import com.hzqy.web.vo.epg.AcDrawChartVo;


@Repository
public class AcDrawDao extends PersistenceDao<Object, Integer> {
	//查询活动记录
	public int selectActionCount(CmActivityVo adbvo) {
		return getSqlSession().selectOne(this.getNamespace() + "selectActionCount", adbvo);
	}
	//修改活动记录
	public int updateAction(CmActivityVo adbvo) {
		return getSqlSession().update(this.getNamespace() + "updateAction", adbvo);
	}
	//添加活动记录
	public int insertAction(CmActivityVo adbvo) {
		return getSqlSession().insert(this.getNamespace() + "insertAction", adbvo);
	}
	//删除活动记录
	public int deleteAction(int f_aca_id) {
		return getSqlSession().update(this.getNamespace() + "deleteAction", f_aca_id);
	}
	//根据id查询活动记录
	public CmActivityVo seletcActionById(int f_aca_id) {
		return getSqlSession().selectOne(this.getNamespace() + "seletcActionById", f_aca_id);
	}
	//查询活动列表
	public List<CmActivityVo> selectActionList(Map<String, Object> map) {
		return getSqlSession().selectList(this.getNamespace() + "selectActionList",map);
	}
	//查询页面
	public AcDrawChartVo selectChartList(Map map){
		return getSqlSession().selectOne(this.getNamespace() + "selectChartList",map);
	}
	//查询按钮
	public List<AcDrawButtonVo> selectButtonList(Map map){
		return getSqlSession().selectList(this.getNamespace() + "selectButtonList",map);
	}
	//删除活动相关页面
	public int deleteChar(Map map) {
		return getSqlSession().delete(this.getNamespace() + "deleteChar", map);
	}
	//删除页面所有按钮
	public int deleteButton(int f_adb_draw_id) {
		return getSqlSession().delete(this.getNamespace() + "deleteButton", f_adb_draw_id);
	}
	//插入页面
	public int insertchar(AcDrawChartVo adcv) {
		return getSqlSession().insert(this.getNamespace() + "insertchar", adcv);
	}
	//修改页面
	public int updatetchar(AcDrawChartVo adcv) {
		return getSqlSession().update(this.getNamespace() + "updatetchar", adcv);
	}
	//插入页面按钮
	public int insertButton(AcDrawButtonVo adcv) {
		return getSqlSession().insert(this.getNamespace() + "insertButton", adcv);
	}
	
}
